<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinancialStatementsLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_financial_statements_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('sn')->default(null)->comment('订单号');
            $table->timestamp('date_str')->default(null)->comment('下单日期,预约日期');
            $table->string('names')->comment('名称');
            $table->decimal('money')->comment('本工作室金额');
            $table->integer('type')->default(0)->comment('商品类型(1:课程,2:商品,3:质询,4:打赏)');
            $table->integer('settle_status')->default(0)->comment('0未结算1已结束');
            $table->integer('goods_num')->default(0)->comment('商品数量');
            $table->integer('add_or_sub')->default(0)->comment('1加2减');
            $table->integer('work_id')->default(0)->comment('工作室ID');
            $table->integer('goods_id')->default(0)->comment('商品ID,课程id,医师id');
            $table->integer('consult_type')->default(0)->comment('咨询类型1图文2电话');
            $table->decimal('supplier_money')->comment('供应商得钱');
            $table->decimal('work_money')->comment('分享的工作室得钱');
            $table->decimal('platform_money')->comment('总平台得钱');
            $table->integer('consult_duration')->comment('咨询时长');
            $table->integer('sex')->comment('性别1男2女');
            $table->integer('age')->comment('年龄');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_financial_statements_logs');
    }
}
